package com.bird.multipleevent;

import org.springframework.context.ApplicationListener;

/**
 * @data 2023/4/8 11:09
 * @author: bird
 * @description:
 * 红色事故监听器
 */
public class RedAccidentEventListener implements ApplicationListener<RedAccidentEvent> {

   /*专门监听红色事件*/
    @Override
    public void onApplicationEvent(RedAccidentEvent redAccidentEvent) {
        System.out.println("发生了红色事故:需要通过邮件告知技术员:" +redAccidentEvent.getSource());
    }
}
